package com.tc.quartz.support.service;


import com.tc.quartz.frame.base.IBaseService;
import com.tc.quartz.support.bean.JobManagerBean;

import java.util.List;

/**
 * desc：任务管理接口
 * @author yongjin.ye
 */
public interface IJobManagerService extends IBaseService {
	
	/**
	 * 增加任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void addJob(JobManagerBean qrtzJobManagerBean) throws Exception;

	/**
	 * 删除任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void delJob(JobManagerBean qrtzJobManagerBean) throws Exception;

	/**
	 * 暂停任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void pauseJob(JobManagerBean qrtzJobManagerBean) throws Exception;

	/**
	 * 恢复任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void resumeJob(JobManagerBean qrtzJobManagerBean) throws Exception;

	/**
	 * 触发任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void triggerJob(JobManagerBean qrtzJobManagerBean) throws Exception;

	/**
	 * 更新任务
	 * @param qrtzJobManagerBean
	 * @throws Exception
	 */
	public void updateJob(JobManagerBean qrtzJobManagerBean) throws Exception;
	
	/**
	 * 查询节点状态
	 * @return
	 */
	public <T> List<T> selectSchedulerState();
	
	public <T> List<T> selectFiredTriggers();
	

}
